package model.punishte;

import model.Pagesa;

import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Author: Kostika Gorica
 * User:   kosta
 * Date:   3/9/13
 * Time:   10:41 PM
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
@XmlRootElement(name = "prodhim")
public class Prodhim {
    private int id;
    private int punetorID;
    private int operatorID;
    private int produktID;
    private double nrDozave;
    private double nrNjesive;
    private double prodhimIdeal;
    private double prodhimFakt;
    private double kostoFikse;
    private double kostoExtra;
    @XmlElement(nillable = true)
    private Date dataProdhimit;
    @XmlElement(nillable = true)
    private Date dataVeprimit;
    private int punishteID;
    private int magazinaID;
    @XmlElement(nillable = true)
    private String shenime;
    @XmlAnyElement(lax = true)
    @XmlElementRef(type = Konsum.class)
    @XmlElementWrapper
    private List<Konsum> konsumList;
    @XmlAnyElement(lax = true)
    @XmlElementRef(type = Pagesa.class)
    @XmlElementWrapper
    private List<Pagesa> pagesaList;

    public Prodhim(){
        this(0,0,0,0,0.0,0.0,0.0,0.0,0.0,0.0,null,null,0,0,"");
    }

    public Prodhim(int id, int punetorID, int operatorID, int produktID, double nrDozave, double nrNjesive, double prodhimIdeal, double prodhimFakt, double kostoFikse, double kostoExtra, Date dataProdhimit, Date dataVeprimit, int punishteID, int magazinaID, String shenime) {
        this.id = id;
        this.punetorID = punetorID;
        this.operatorID = operatorID;
        this.produktID = produktID;
        this.nrDozave = nrDozave;
        this.nrNjesive = nrNjesive;
        this.prodhimIdeal = prodhimIdeal;
        this.prodhimFakt = prodhimFakt;
        this.kostoFikse = kostoFikse;
        this.kostoExtra = kostoExtra;
        this.dataProdhimit = dataProdhimit;
        this.dataVeprimit = dataVeprimit;
        this.punishteID = punishteID;
        this.magazinaID = magazinaID;
        this.shenime = shenime;
        konsumList = new ArrayList<Konsum>();
        pagesaList = new ArrayList<Pagesa>();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPunetorID() {
        return punetorID;
    }

    public void setPunetorID(int punetorID) {
        this.punetorID = punetorID;
    }

    public int getOperatorID() {
        return operatorID;
    }

    public void setOperatorID(int operatorID) {
        this.operatorID = operatorID;
    }

    public int getProduktID() {
        return produktID;
    }

    public void setProduktID(int produktID) {
        this.produktID = produktID;
    }

    public double getNrDozave() {
        return nrDozave;
    }

    public void setNrDozave(double nrDozave) {
        this.nrDozave = nrDozave;
    }

    public double getNrNjesive() {
        return nrNjesive;
    }

    public void setNrNjesive(double nrNjesive) {
        this.nrNjesive = nrNjesive;
    }

    public double getProdhimIdeal() {
        return prodhimIdeal;
    }

    public void setProdhimIdeal(double prodhimIdeal) {
        this.prodhimIdeal = prodhimIdeal;
    }

    public double getProdhimFakt() {
        return prodhimFakt;
    }

    public void setProdhimFakt(double prodhimFakt) {
        this.prodhimFakt = prodhimFakt;
    }

    public double getKostoFikse() {
        return kostoFikse;
    }

    public void setKostoFikse(double kostoFikse) {
        this.kostoFikse = kostoFikse;
    }

    public double getKostoExtra() {
        return kostoExtra;
    }

    public void setKostoExtra(double kostoExtra) {
        this.kostoExtra = kostoExtra;
    }

    public Date getDataProdhimit() {
        return dataProdhimit;
    }

    public void setDataProdhimit(Date dataProdhimit) {
        this.dataProdhimit = dataProdhimit;
    }

    public Date getDataVeprimit() {
        return dataVeprimit;
    }

    public void setDataVeprimit(Date dataVeprimit) {
        this.dataVeprimit = dataVeprimit;
    }

    public int getPunishteID() {
        return punishteID;
    }

    public void setPunishteID(int punishteID) {
        this.punishteID = punishteID;
    }

    public int getMagazinaID() {
        return magazinaID;
    }

    public void setMagazinaID(int magazinaID) {
        this.magazinaID = magazinaID;
    }

    public String getShenime() {
        return shenime;
    }

    public void setShenime(String shenime) {
        this.shenime = shenime;
    }

    public List<Konsum> getKonsumList() {
        return konsumList;
    }

    public void setKonsumList(List<Konsum> konsumList) {
        this.konsumList = konsumList;
    }

    public List<Pagesa> getPagesaList() {
        return pagesaList;
    }

    public void setPagesaList(List<Pagesa> pagesaList) {
        this.pagesaList = pagesaList;
    }
}
